//
//  CompAudioView.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/3/13.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class CompAudioView: NSView {
    override init(frame frameRect: NSRect) {
        super.init(frame: frameRect)
        self.setupUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI() {
        self.addSubview(compBtn)
        compBtn.snp.makeConstraints { (make) in
            make.width.equalTo(300)
            make.centerX.equalToSuperview()
            make.height.equalTo(30)
            make.centerY.equalToSuperview().offset(-30)
        }
        
        self.addSubview(txtBtn)
        txtBtn.snp.makeConstraints { (make) in
            make.width.equalToSuperview().offset(-100)
            make.centerX.equalToSuperview()
            make.height.equalTo(30)
            make.top.equalTo(compBtn.snp.bottom)
        }
    }
    
    lazy var compBtn: ZHButton = {
        let btn = ZHButton()
        btn.title = "使用电脑音频加入"
        btn.font = NSFont.systemFont(ofSize: 14)
        btn.zh_color = NSColor.white
        btn.zh_backgroundColor = color_main108
        btn.hasBorder = true
        btn.zh_cornerRadius = 10
        btn.action = #selector(compBtnAction(senber:))
        btn.target = self
        return btn
    }()
    
    lazy var txtBtn: ZHButton = {
        let btn = ZHButton()
        btn.title = "测试扬声器和麦克风"
        btn.font = NSFont.systemFont(ofSize: 14)
        btn.zh_color = color_main108
        btn.action = #selector(txtBtnAction(senber:))
        btn.target = self
        return btn
    }()
    
    @objc func compBtnAction(senber:ZHButton) {
        
    }
    
    @objc func txtBtnAction(senber:ZHButton) {
        
    }
    
}
